#include <gbmain.h>
#include <stdio.h>
#include <stdlib.h>
#include <constdef.h>

#include <DiskManager.h>

#include "sys_inc.h"
#include "onvif_api.h"
#include <signal.h>

#include <Socket.h>

clsGb28181 *g_pGb28181;
LocalMsg m_localmsg;
RemoteMsg m_remotemsg;

clsDiskManager m_DiskManager;

#include <vector>
#include <string>

using namespace std;

int main()
{
	/////
	m_localmsg.localport = 5061;
	m_localmsg.username ="34020000001320000001";
	m_localmsg.userid = "34020000001320000001";
						 
	m_localmsg.userpsw = "12345678";
	m_localmsg.encryption = "MD5";

	m_remotemsg.remoteid = "123";
	m_remotemsg.remoteip = "192.168.114.1";
	m_remotemsg.remoteport = 5060;


	DEBUG_PRINT("%s %s %d start program!\n", __FILE__, __FUNCTION__, __LINE__);

	g_pGb28181= new clsGb28181();


	//	g_pGb28181->Gb28181_Start(&m_localmsg, &m_remotemsg, 180);
	//	g_pGb28181->Gb28181_Register();

	//
	m_DiskManager.FormatDisk();

	onvif_start();

	Socket msocket;
	vector<string> vIPList;
	vector<i32> vList;
	msocket.GetLocalIPList(vIPList);
	msocket.GetAdapterSpeed(vList);
	
	while(1)
	{

		osip_usleep(10000);
	}
	return 1;
}

